package com.wy.panda.event.listener;

import com.wy.panda.event.TestEvent.Test2ApplicationEvent;
import com.wy.panda.event.TestEvent.Test3ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * 测试事件处理
 *
 * @author WangYuan
 * @since 2020年11月13日 下午7:33:50
 */
@Slf4j
@Component
public class TestEventHandler {

	@EventListener
	public void handle(Test2ApplicationEvent event) {
		log.info("2" + event.toString());
	}
	
	@EventListener
	public void handle(Test3ApplicationEvent event) {
		log.info("3" + event.toString());
	}
}
